Multiple activation of same device was creating multiple records of it in db