Fixing bug in last commit due to forgetting about pairs().