Wrapped common behaviour into onEnterWrapper.