wait to workaround race conditions