chapter to target chapter write

fixes chapter scrollnav not closing sections