fix issues found by findBugs #2