Put the "else" on the same line as the preceding }. i.e.

    } else {