improved get title to remove - from the end