part 1 of fixing #5521