fixing bug #4982