fix #152, #155: Exception when stopping server