fixed a bug in the trim2.4