apply nice patch from Roland Kool