fix bug when dictionary to object