Fix back button issue in shell.

If you ran a commmand, html streaming messes the history object.
This has been fixed by going deeper in history.