Bug fix: infinity loop.