Fixing bug #3865.