Corrected the if logic