Thanks that worked, and I applied the same logic to another category page which worked with the fix as well.