Preventing duplicate instances

Preventing duplicate instances