Fix bug with categories