fixed a bug in demo