Fixed part of an update function.