Fixed buggy demo script