Fix loop rendering issue