Applied patch from bug #2125.