correct #301

This corrected #301 to call "shutdown!" method, when Trema is terminated.