Changed length values for trimming algorithm.