Fix possible race condition with dialogs double tap