history api bugs fixes
Merge remote-tracking branch 'origin/gh-pages' into gh-pages

Conflicts:
	index.html
	index_debug.html
Merge remote-tracking branch 'origin/gh-pages' into gh-pages

Conflicts:
	index.html
	index_debug.html