Fixed error on each_with_object.