fix findbugs problems

now passes moderate findbugs checking with 0 errors.