Corrected a bug in demo