misc findbugs fixes, tests