Reintroduce fix which was lost in merge.