Fix remote learndb query.