fixing bug #5953