fix handling of instance saving