Fixed compute-grade js, when grade is failed