fix short circuit of demo program