Added David O'Neills fix to HEAD (hmmm. how did this compile... :-).