fixed update and query