Fixed null pointer exception when new grades