Fixed bug in iterator, added test for various sizes