Remove potential race condition