fix bugs in 3edc