Fix infinite while loop.
Merge pull request #1183 from najor/dev-cite-plugin-issue

Fix infinite while loop.