Fix removal code