Fix some issues found in findBugs

Fix some minor issues found by findBugs plugin.