You have no guarantee that `@scriptaliases` is an array. Try `Array(@scriptaliases)` instead.