fixed error on saving the grades