Fix the issue using iterators

Problem arose when `coef_` and first item in the `dict_` were both numeric. Previously
`*` sign was not inserted between `coef` and the first entry in the `dict_`.