Fixed compability with the new session system