fixed a small error with if statements

silly mistake with logic gates