Fix really stupid infinite loop.