Fix disable history on Device if there is no Device.