bug fixed in render()