Fixed undefined message when restarting/shutting down server.