Fix effects of removing location.js