fix warning when calling script methods