Fix for #38 shutdown bug

Fix for #38 shutdown bug