Fix the bug in the conditions