fixed some issues found by Findbugs