Fixing error messages in main.