fixed bunch of session stuff