Bug fixes on javascript file grader.js