Added check for title length when truncating title