Fixing bug 3951