improve skipHashchange check to avoid blocking back button