Fix filter sorting issue