fix demo code compile error