Fixed bug with categories