fixed checkstyle, fixed bugs