Fix #588 - Make Ajax/History tabs more robust