fixing bug #4996