corrected opted out error handling