Fix bug: main script was erroring