Fix output code bug when user modifies output area then outputs again