-fixed a bug on web server causing crash after client disconnection.