Fixed parsing of main method