Fix infite loop. (Minor)