Fixed attendance checking functionality