Fixes save and load funciotnality