Graceful shutdown; close #179