fixed location.replace for firefox