Changed before and after for controllers.