Patch from Martin Koegler: