cleanup keys on export