bug fixed setting trimming through events