Fixed accidentally reassigned "grade" variable in for-loop.