Fix running script when it is an array

Fixes #17