fix dangling else