Try to avoid race condition.