fix query argument passing