sleep to prevent race condition