"last" batch of pkg script fixes