Fix update_position method.