Fix main function again