onBeforeAction not working with latest version #799 reproduction