fix some bug for attendance