fixing bug #7822