Clear list when closing windows