Fix bug where script fails with no arguments