Fix some issues with the history and change spaces to tabs