safer index rendering