fix some issues found by findbugs