Fix bug reported by findBugs