fix bug in ivy script