Added shutdown event and handler.