fixed the session errors