Fixed bug that gave duplicate results if sorted by multiple tags