fixed bug with categories