corection segfault in cleanAll