fixed issue #94 , script bugfix