Added explicit save of new objects before setting dynamic properties.