Bugfix: need to make sure categories is always present