Update Main.R

corrected errors