fix bug for fox script engine