Fixed iteration of dictionary items.