Corrected error in getting the first session