Trimming fixes