bugfix in element trim