Bug fix: dictionary keys need to be integers so that the items can be properly be sorted later