What about moving the test up a little so that we do no update the document.title unless there is a change?