bug fixes identified by UT
reorg of coe