Fix MainForm type should be TMainForm instead of TForm1