Fixed an issue that could trigger an infinite loop.