Fix for #2218, now with correct style

Changed three lines, really. The rest is making sure things are acceptable to checkstyle. Sorry about the broken pull request earlier.