Added shutdown method