Fix beforeAction