fixed a bug of trim module.