more reliable cleanup