fix for complexType metadata order issue