Bugfix for handling dynamic document titles

This is a fix for handling dynamic document titles.

References #19