Added changed some errors in main