Update MainformEMX.pas

Some Bugfixes