Fixed Error when an iterator was passed as reference.