key_commit: Fixed a major speed bug in the apportionment process