Fixed scripts implementation bug