Resolver main issue with race condition.