Fixed ScopeLocal bug