Try moving the code to the line IF is at. IF...ELSE... Not IF... ELSE...