Fixed a bug in Save()