Cleaning up bugs identified by FindBugs