Patch from A. Hughes