Fixed a bug in innerTrim