fixed some find bugs and Checkstyle errors