Fixed pesky infinite loop