500 error in remove grade when setting and removing without page reload