bug fix in quey writer
Merge pull request #112 from isururanawaka/master

bug fix in quey writer