Fix bug on replacing multiple query params