mainform corrected