Wrap the history.start() call in an if statement so it can only happen once.