Fix ReferenceError with chapters.