shared pointer fixes to prog demos