Fixed a few bugs with the saving/loading process