Fix error "null" on saving. Create missing XML-Elements if necessary.