Fix saving instances