Fix trimming contents