bug fixes for session handling