Fixed "replace" method not called on query string.