Fix to onsave and onload.