fix some checkstyle and findbugs warnings