Fix bug where query string was included in param