Fixind problems reported by findbugs