Some minor changes to allow the pkg construct