Fixing conditional logic.