fix stmt_handle treatment