minor fixes to mainframe