Fixed issue with retrieving categories