fix missing references in main script