1. add flatten dict bug fix