Race Condition fix