Fixed bug in passing of query to Shark