fix the session issues