Fixed Bug in scriptTemplate