fixed error in Main