multithreading fix for dispatch callbacks