Added autotrim parameter.