Kill Cargo properly

to avoid problems related to it such as #2983.