Corrected sample to create a transport and shut it down