fix various findbugs errors categorized CORRECTNESS and BAD_PRACTICE

**do not review yet**