fixed an error in demo case.