Added fix for a potential auto_array bug. Added more tests for the new iterator