fix a compile error in demo.js