fixes to issues found with findbugs