Removed potential infinite loop.