fixed save and load bugs in engine saving