Race condition fix now works