Thanks esevece for the suggestion and Nick Sandford and Martin Warne for the inital work on the patch.