Fixed bug that double logged OTF queries