NewMain: some fixes for the sake of glory