Fixed sync logic in new student grades script