fixed bug with server::close