Not sure why there is an infinite loop. Very frustrating.