fixed header errors and session cache errors