Added back beforeFilter that was deleted