Fix resolution of main method.