Added message trimming.