update references after move