fix category retrieval