Fix bug in render.