fix html5 history "detection"