fix mainfile