fix divided by 0 in profiles index