bug fix: trigger pageunload when popstate