fix demo bugs