string length fix, fixed errors