corrected calls to session functions