Fixed the "ShortenString" method