Fix loop