fix mutliple instances merging