onStateChangeEvents-fix