removed recursive call that caused stack overflow

I added in a check in peek to ensure that there was a next element,
but checking that calls peek, so you get a stack overflow.