Added trim bugfix