fix for closing tabs