Correct condition checking