Handle close of tab to close sync