Bugfix, better trim