fix some bugs for iotdemo2
complete demo3