Fix consistency patch bug when there are no topics