Added patch from bug #2328