Fixed bad conditional statements