Fix potential races; remove spinloop; add endpoint update event; fix callback verification bug