Bug fix

Fixed "Value was either too large or too small for an UINT32" when trying to save after importing a XML file.
Also improved import performance.