fixed shrink to fit method which sometimes would return out of bounds
exception for strings shorter than 3 chars in length.