Fixed bug in iteration over objects.