fixed calling script from outside;