fix update attendance issue