Fixed Title update Function

altered the title update function, just a bit of tidying  up