added check for duplicated Instances