add ecomwise and fix null pointer