Fix for categories issue.
Still not sure why sometimes the doc is not added.