Stack : Correctly go back to previous win on close

  Previous behaviour was buggy.
  Works now has expected (you can predict wich window
  will be selected when you close a window).