fixed wrong else statement