Tidy up. There is still an error causing process termination AFTER a successful reply has been returned.