Fixed leak with Prepare and loop executor