fix some errors reported by autograding system