Fix code which was inadvertently deleted in 1.8