additional bits from the script fix commit