Infinite loop fixed

Simple human error on this occasion