fix total_percentage so it actually gets changed