initial before filter implementation
fix before filter errors if not before filter is present