Fixed a bug where the output box did not reset when r was pressed.