Fix errors in NSCoding.