fixed bug with == in else statement