Fix two bugs in the demo app.