Bug in the main()