Added shutdown support