Added shutdown feature