Fix problem with dict assingment