fix error when vote ids is null