Make trim unit tests pass