Minor refactoring suggested by findbugs