fixed chapterid check