Fixes according to some of the findbugs suggestions