Where are your "elseif"s? How can you run 2 ifs with the opposite parameters at the same time? I advice you to fix that... xD