Fixed if conditions