some fixes for save/load