Fix for bug #20851, provided by bumbadadabum