PW-36 Don't create a blank h1 tag on pages without a title
PW-36 Fix bug in code that meant the header wasn't correctly set