window location replace not overriden unless in phonegap