fixed ifs restore