Fix return values in BuildPackages