fixed issue when popState reaches home page