Fixed duplicate entry exception