key_commit: Fixed a speed issue with the apportionment process