fixed dynamic script bug.