Fix incorrect popstate on load