ctx is cleared before new output is moved to it. else we have old results also in there