fixed wrong variable passed to session