Applied patch from Martin Buchholz <martin@xemacs.org>.