cleanup and account for when it fails