fix some bug in demo