Fix server exit