change location.path to check if reload needed