clean up, temp session management fix up