fix trim on firefox