onEnter() error fixed