fix directory to include query info