minor fixes to trim properties script