Updates based on a bug report by Andrew Bradley to fix the demo