fix execution of main