Fixing bug #3646.