changed str → unicode in the flatten list+dict