Improved closing tab function
minor fixes.
Fixed list comparison problem, for good !