Added shutdown method.