add correct handling of query params in server sync, fixes #388

This fixes #388

This also fixes an issue with redundant params getting set as querystring params in the client server sync.
e.g.  /issues/123?id=123