Fixing a bug when OpenClosedPropety is null and adding trim to the propreties string generated