Fix to truncated titles. I am not sure where the old algorithm came from
but it was really not a good bit of code.