fixed category id being null when no categories