Properly set title

Fixes #81

This works for me. I'm not sure if the or condition is getting called in my case so I'd like someone to test that.