Fix loop retriggering