fixes in main.