Fix a dangling reference to callback in chatdemo.py.