Solved IfElse problem