Fixes #6: Proper destruction of session.