fix problems with percentages