Bug fix changes to session