Cleanup up branch session on close.