fix #1 close connection crash