fixed restore shell error