Fix errors in update