Fixed the problem with and query when the second filter is on the sorted column