refactoring: fix findbugs issues