Added a little optimization in filters/actions.