Some fixes for packages auto build