fixing manager model deleting keys reference when updated