Added fix to db query in items by category