fix cat query