Re-add code that was lost in merge.