Added session closing