add close defer for rows