fix bug in demo