small cleanup in main()