Fix temp_instances