fixes to usertemplate upload and some xsd