Fixes test and checkstyle errors