Found infinite loop, and fixed it