Fix TypeError on lines 511-512, in render