handling cases for duplicate handles