Corrected some issues with Program 2