More changes to main to fix small number problem.