Exception in RenderBlocks function