Several minor fixes to get the demos working again