fix instance update and make tests pass