restored renderEnd()