various fixes for packaging problems