Replace save data code

Despite testing I did not pick up on the fact that this code was needed.