Fix a bug in a demo