Fixed the "Resultset closed" exception in annex