Fix error on gallery students total record error