clean up tab handling race condition with callback