DFmainXC most bugs fixed