magic method fix for iterator