fix demo echo code