This fixes a number of issues found during my demo with Andreas.