Refactored debind and remove to handle more cases