Fixed Ace editor from duplicating text and triggering errors