Fix setting title of the error window.

Sadly this is slow.