Fixed minor bug when setting title and created unit test to cover that glitch.