Fix with main function