Trim tail spaces