Better support for server exit