Fix bugs,  change EF