i don't think this line does anything (you might have to delete it from the instance._doc and/or set it to None on instance