fixed query bug in category page