Fix RT#48717 & RT#50484