Update to SmartFactory to check for ProfileId when missing