cleanup for flat ntupler