Fix dead loop.