fix main script