fixed memory leak + output consistency

When issuing exec() calls multiple times on the same object the memory blows up heavily because the output was appended to the array. 
Additionally this fixes consistency of the output-Variable.