end iterator mistake fixed