prevent stack size explosion from autoTrim

fix #16
0.11.2