session close fix