fix page history management