fixed a wrong IF statemeng