Bug fix! Fixed a infinity loop.