Fix scripts to run on main()