fix a resource-to-genericresource migration bug