Change location to "/" if error