fixed a bug where some percentages were over 100