Fix bugs found by Findbugs