fixed bug when $chapter = 0 in pne_course_menu_structure