Added shutdown() method.