handle close status