fixed header and session stuff