Fix bug found with findbugs