Fixes for save and load.