Some changes tidying up pre-patch and a fix that now has hadoop working