Fixed sorting issue by adding filter index