bug fix for divided by 0 and names bug