Fixes #56. We were closing rows that had not been opened.