dh-book: improve finalize