close session before reparse