Changed to avoid TransactionTooLargeException.