Fixed some small findbugs and checkstyle problems.