Fixed Mainframe restore bug