fix createContents when previous or next category is null