fixed bug in demo