maybe a fix for bug #519583, needs a closer look.