fixed bug where title not being set correctly