Properly fix query filters.