Fix old uses of main method