fix inline script bug