Packaging fixes

Some fixes that I discovered were needed while I was testing packaging.