Fix bugs in grader.js