fixed failed test and checkstyle errors