Fix error in update hook