Fixed another infinite loop