fix #666 History Manager state not updated when replacing page