Why does script need to depend on main?