Fix for issue 2796