fix buggy url replacing