Close rows on error