Fixes errors when updating an invalid record.