Fix cannot load the main panel issue