The Sort by type is working correctly