fixing bug #4761