Change before to onBeforeAction