I've verified by adding tests that the trim is needed, I'm gonna leave it like it is now, but will add a TODO to see if we can optimize this in the future