4070 address bugs in ode

Fixes few bugs that cause many duplication, demotion, prepoulation and data corruption issues in cases.