fix add to working set safety check
fix close all case