Fixed race conditions and forced state overriding
Removed blocking sleep