fixed listing count and sort