Critical fix in main.