Fix dangling else statements