Added delete logic to UnRegister method