improve cleanup