fixed alert on else statement