server shutsdown properly