EXHIBIT 10.5

                         AMENDMENT NO. 1 TO THE AMENDED
                        AND RESTATED CUSTODIAL AGREEMENT

            AMENDMENT NO. 1, dated as of September 27, 2004 (this "Amendment"),
to the Amended and Restated Custodial Agreement, dated as of November 26, 2003
(as amended, restated, supplemented or otherwise modified prior to the date
hereof, the "Existing Custodial Agreement", a as amended, hereby and as further
amended, restated, supplemented or otherwise modified and in effect from time to
time, the "Custodial Agreement"), by and among AMERICAN HOME MORTGAGE CORP., a
New York corporation, AMERICAN HOME MORTGAGE INVESTMENT CORP., a Maryland
corporation, AMERICAN HOME MORTGAGE HOLDINGS, INC., a Delaware corporation,
AMERICAN HOME MORTGAGE ACCEPTANCE, INC., a Maryland corporation, and AMERICAN
HOME MORTGAGE SERVICING, INC., a Maryland corporation (formerly known as
Columbia National, Incorporated) (each a "Borrower", collectively the
"Borrowers"), DEUTSCHE BANK NATIONAL TRUST COMPANY, as custodian (in such
capacity, the "Custodian"), and MORGAN STANLEY BANK (the "Lender Agent").

                                    RECITALS

            The Borrowers, the Lender Agent and the Custodian are parties to the
Existing Custodial Agreement. Capitalized terms used but not otherwise defined
herein shall have the meanings given to them in the Existing Custodial
Agreement.

            The Borrowers, the Lender Agent and the Custodian have agreed,
subject to the terms and conditions of this Amendment, that the Existing
Custodial Agreement be amended to revise Annex I of the Existing Custodial
Agreement.

            Accordingly, the Borrowers, the Lender Agent and the Custodian
hereby agree, in consideration of the mutual premises and mutual obligations set
forth herein, that the Existing Custodial Agreement is hereby amended as
follows:

            Section 1. Amendments.

            1.1 The Existing Custodial Agreement is hereby amended by deleting
Annex I to the Existing Custodial Agreement in its entirety and substituting in
lieu thereof the Annex I attached hereto.

            1.2 Annex 4 paragraph 11 of the Existing Loan Agreement is hereby
deleted in its entirety and the following shall be inserted in lieu thereof:

                "11 based upon a review of the Mortgage Note, items (d), (f),
         (g), (h), (m), (p), (bb), (hh), (jj), (ggg) and (ooo) of Annex 1 as set
         forth in the Mortgage Loan Schedule delivered by the applicable
         Borrower to the Custodian are correct;"

            Section 2. Conditions Precedent. This Amendment and its provisions
shall become effective on the date (the "Amendment Effective Date") on which the
following

                                      -2-


conditions precedent shall have been satisfied, and upon satisfaction of such
conditions precedent the Amendment Effective Date shall be the date of this
Amendment:

            2.1 Delivered Documents. On or before the Amendment Effective Date,
the Lender Agent shall have received the following documents, each of which
shall be satisfactory to the Lender Agent in form and substance:

            (a) Amendment. This Amendment, executed and delivered by a duly
      authorized officer of each of the Borrowers, the Custodian, and the Lender
      Agent;

            (b) Amendment to the Loan Agreement. An amendment to the Loan
      Agreement dated as of September 27, 2004, executed and delivered by a duly
      authorized officer of each of the Borrowers and the Lender Agent (the
      "Sixth Amendment"); and

            (c) Other Documents. Such other documents as the Lender Agent or
      counsel to the Lender may reasonably request.

            2.2 No Default. On the Amendment Effective Date, after giving effect
to the Sixth Amendment, (i) each Borrower shall be in compliance with all the
terms and provisions set forth in the Existing Custodial Agreement on its part
to be observed or performed, (ii) the representations and warranties made and
restated by each Borrower pursuant to Section 3 of this Amendment shall be true
and complete on and as of such date with the same force and effect as if made on
and as of such date, and (iii) no Default shall have occurred and be continuing
on such date.

            Section 3. Representations and Warranties. After giving effect to
the Sixth Amendment, each Borrower hereby represents and warrants to the Lender
Agent and the Custodian that it is in compliance with all the terms and
provisions set forth in the Loan Documents on its part to be observed or
performed, and that no Default has occurred or is continuing, and hereby
confirms and reaffirms its representations and warranties contained in Section
10 of the Existing Custodial Agreement.

            Section 4. Limited Effect. Except as expressly amended and modified
by this Amendment, the Existing Custodial Agreement shall continue to be, and
shall remain, in full force and effect in accordance with its terms; provided,
however, that reference therein and herein to the "Loan Documents" shall be
deemed to include, in any event, this Amendment. Each reference to the Custodial
Agreement in any of the Loan Documents shall be deemed to be a reference to the
Custodial Agreement as amended hereby. The execution of this Amendment by the
Lender or Custodian shall not operate as a waiver of any of their rights, powers
or privileges under the Custodial Agreement or under any of the other Loan
Documents except as expressly set forth herein.

            Section 5. Counterparts. This Amendment may be executed by each of
the parties hereto on any number of separate counterparts, each of which shall
be an original and all of which taken together shall constitute one and the same
instrument. Delivery of an executed counterpart of a signature page to this
Amendment in Portable Document Format (PDF) or by facsimile transmission shall
be effective as delivery of a manually executed original counterpart thereof.




            Section 6. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND
CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

                            [SIGNATURE PAGE FOLLOWS]





            IN WITNESS WHEREOF, the parties hereto have caused this Amendment to
be duly executed and delivered as of the day and year first above written.


                                       BORROWERS

                                       AMERICAN HOME MORTGAGE CORP.


                                       By:  /s/ Craig Pino
                                          ------------------------------------
                                          Name:  Craig Pino
                                          Title: SVP


                                       AMERICAN HOME MORTGAGE INVESTMENT CORP.


                                       By:  /s/ Craig Pino
                                          ------------------------------------
                                          Name:  Craig Pino
                                          Title: SVP


                                       AMERICAN HOME MORTGAGE HOLDINGS, INC.


                                       By:  /s/ Craig Pino
                                          ------------------------------------
                                          Name:  Craig Pino
                                          Title: SVP


                                       AMERICAN HOME MORTGAGE ACCEPTANCE, INC.


                                       By:  /s/ Craig Pino
                                          ------------------------------------
                                          Name:  Craig Pino
                                          Title: SVP


                                       AMERICAN HOME MORTGAGE SERVICING, INC.
                                          (f/k/a Columbia National,
                                          Incorporated)


                                       By:  /s/ Craig Pino
                                          ------------------------------------
                                          Name:  Craig Pino
                                          Title: SVP





                                       LENDER AGENT
                                       ------------

                                       MORGAN STANLEY BANK



                                       By:  /s/ Paul Najarian
                                          ------------------------------------
                                          Name: Paul Najarian
                                          Title: Vice President




                                       CUSTODIAN
                                       ---------

                                       DEUTSCHE BANK NATIONAL TRUST COMPANY



                                       By:  /s/ Andrew Hays
                                          ------------------------------------
                                          Name:  Andrew Hays
                                          Title: Associate



                                       By:  /s/ Tsutomu Yoshida
                                          ------------------------------------
                                          Name:  Tsutomu Yoshida
                                          Title: Assistant Vice President




                                                                         Annex 1
                                                          to Custodial Agreement
                                                          ----------------------

                   INFORMATION TO BE PROVIDED WITH RESPECT TO
                             ELIGIBLE MORTGAGE LOANS

For each Mortgage Loan, the applicable Borrower shall provide the
following information:

            (a)    Number of Times Delinquent 30 days in last 12 months;

            (b)    Number of Times Delinquent 60 days in last 12 months;

            (c)    Number of Times Delinquent 90+ days in last 12 months;

            (d)    Address City;

            (e)    Address County;

            (f)    Address State;

            (g)    Address Street;

            (h)    Address Zipcode;

            (i)    Amort Type (Fixed or ARM);

            (j)    Backend Debt Ratio (all debt/income);

            (k)    Balance Appraisal;

            (l)    Balance Current;

            (m)    Balance Original;

            (n)    Balance Senior;

            (o)    Balloon;

            (p)    Borrower Name;

            (q)    CLTV Original;

            (r)    Co-Borrower's Credit Score (if applicable);

            (s)    Co-Borrower's Name (if applicable);

            (t)    Commitment Expiration;

            (u)    Convertible;

                                   Annex 1-1


            (v)    Coupon Current;

            (w)    Coupon Init Per Cap;

            (x)    Coupon IO;

            (y)    Coupon Life Cap;

            (z)    Coupon Max;

            (aa)   Coupon Min;

            (bb)   Coupon Original;

            (cc)   Coupon Periodic Cap;

            (dd)   Coupon Periodic Floor;

            (ee)   Credit Score (FICO);

            (ff)   Credit Score Type (Beacon, Equifax, TransUnion or Merge);

            (gg)   Date First Cpn Change;

            (hh)   Date First Payment;

            (ii)   Date First Pmt Change;

            (jj)   Date Maturity;

            (kk)   Date Next Coupon Change;

            (ll)   Date Next Due;

            (mm)   Date Next Pay Change;

            (nn)   Date Orig;

            (oo)   Date Paid Thru;

            (pp)   Day Count;

            (qq)   Debt Ratio Back;

            (rr)   Debt Ratio Front;

            (ss)   Delinq Status;

            (tt)   Documentation Type;

                                   Annex 1-2


            (uu)   Escrow Flag (Yes or No);

            (vv)   Forclosure/REO/Bankruptcy Status;

            (ww)   Freq Coupon Adj;

            (xx)   Freq Payment Adj;

            (yy)   Frequency Pmt;

            (zz)   Frontend Debt Ratio (mortgage debt/income);

            (aaa)  Fund Date;

            (bbb)  Index (for ARMs);

            (ccc)  IO Flag (Yes or No);

            (ddd)  Lien Status;

            (eee)  Loan Purpose;

            (fff)  Loan Type (residential, etc..);

            (ggg)  Loan Id Number;

            (hhh)  LTV Current;

            (iii)  LTV Original;

            (jjj)  Margin;

            (kkk)  Number of Units;

            (lll)  Occupancy;

            (mmm)  Ownership Type (Leasehold, Fee Simple, etc...);

            (nnn)  P&I Current;

            (ooo)  P&I Original;

            (ppp)  PMI (Yes or No);

            (qqq)  PMI Percentage (if applicable);

            (rrr)  PMI Provider (if applicable);

            (sss)  Prepayment Penalty (Yes or No);

                                   Annex 1-3


            (ttt)  Prepayment Penalty Description;

            (uuu)  Prepayment Penalty Term

            (Months Freely Prepayable);

            (vvv)  Product Type;

            (www)  Property Purchase Amount/Sales Price;

            (xxx)  Property Type;

            (yyy)  Rating;

            (zzz)  Rounding Factor;

            (aaaa) S&P Appraisal Type;

            (bbbb) S&P Document Type;

            (cccc) Section 32 Flag;

            (dddd) Service Fee Amount;

            (eeee) Social Security Number;

            (ffff) Takeout Investor;

            (gggg) Takeout Price;

            (hhhh) Term Amort Original;

            (iiii) Term Coupon Teaser;

            (jjjj) Term IO Original;

            (kkkk) Term Original;

            (llll) Term PNI Teaser;

            (mmmm) Warehouse Amount;and

            (nnnn) Warehouse Bank.

                                   Annex 1-4