bug fix that did not check for duplicated index in the series and dicotomy in the values