fix attendence counting issue