Fix saving bug