Fixed infiniti loop.