fixing bug #5127