crash fix

we sometimes deleted api query while it was still receiving data, which can be a problem