Make sort apply to view