Close previous session before opening it