Futher fixed the previous problem so that it doesn't go on shutOff repeatedly