Fix render_popup