fix low memory issues & delete instances