Fix dangling "else" statements