Trimming strings on save