Fixed problem when gettinga a category