Fixing bug with passing query parameters

There is a bug in current version that i've fixed.
Please pull my pull-request ) Cheers.