fixed terrible memory management issues wsith CSEFlow (I think)