build dist with script fix