Handle cases where the record isn't set and cleanups