More robust cleanup