Corrected main function calling