Fix bug, don't get stuck in infinite loop