simplify Main.Base initialization and fix #7245 in the process