fix compile error for the demo