fix enter/leave events to use different internal var
Merge pull request #136 from Animatron/pegov/inout-fix

fix enter/leave events to use different internal var
Merge branch 'master' into fix-editor-incompatibilities
accidentally apply v1.0