Schedule the rendering outside the transaction block to prevent deadlock