Fix else statement bug