Fix the case when string length equal to 1.