Fixed navigation problem, used substring of location.path to determine where the user is