Fixes issues found by FindBugs.