Fixed a few issues detected by Findbugs