Fixing ChatJS scripts (they were different from the sample)