*1036In an action for a divorce and ancillary relief, the defendant appeals (1), as limited by his brief, from stated portions of a judgment of the Supreme Court, Suffolk County (Cohen, J.), dated August 31, 2007, which, after a nonjury trial, inter alia, directed him to pay the plaintiff maintenance in the sum of $690 per week for a period of four years and the sum of $540 per week for a period of two years thereafter, directed him to pay retroactive maintenance and child support arrears, and awarded the plaintiff the sum of $5,280, representing the appreciation of the marital portion of property held jointly by the parties with the defendant’s mother, and (2) from a money judgment of the same court also dated August 31, 2007, which, upon a decision of the same court dated February 8, 2007, awarding the plaintiff an attorney’s fee in the sum of $41,217.83, is in favor of the plaintiff and against him in that amount.
Ordered that the judgment is modified, on the facts and in the exercise of discretion, (1) by adding a provision thereto stating that the defendant is entitled to declare one of the parties’ children as a dependent on his income tax returns, and directing the plaintiff to execute the appropriate Internal Revenue Service forms, (2) by adding to the fifth decretal paragraph thereof a provision stating that the defendant’s obligation to pay maintenance shall terminate upon the death of either party or the plaintiffs remarriage, (3) by adding thereto a provision awarding the defendant a credit against his retroactive maintenance and child support arrears for carrying charges he paid on the marital home during the pendency of the action, and (4) deleting the provision thereof awarding the plaintiff the sum of $5,280 representing the appreciation of the marital portion of property held jointly by the parties with the defendant’s mother and substituting therefor a provision awarding the plaintiff the sum of $2,640; as so modified, the judgment is affirmed insofar as appealed from, and the matter is remitted to the Supreme Court, Suffolk County, for a hearing and determination as to the credit to which the defendant is entitled for carrying charges and for the entry of an appropriate amended judgment; and it is further,
Ordered that the money judgment is affirmed; and it is further,
Ordered that one bill of costs is awarded to the plaintiff.
Contrary to the defendant’s contention, in light of, inter alia, the defendant’s greater financial resources, the Supreme Court properly awarded the plaintiff an attorney’s fee in the sum of $41,217.83 (see O’Halloran v O’Halloran, 58 AD3d 704 [2009]; Ciociano v Ciociano, 54 AD3d 797 [2008]).
*1037However, while the Supreme Court providently exercised its discretion in awarding the plaintiff maintenance in the sum of $690 per week for four years and the sum of $540 per week for a period of two years thereafter (see Domestic Relations Law § 236 [B] [6] [a]), it erred in failing to include a provision that the award of maintenance shall terminate upon the death of either party or the plaintiffs remarriage (see Haines v Haines, 44 AD3d 901 [2007]).
Further, the defendant correctly contends that in directing him to pay maintenance and child support arrears, the Supreme Court erred in failing to credit him with sums he paid for the carrying costs on the marital home during the pendency of the action. Accordingly, the matter must be remitted to the Supreme Court, Suffolk County, to calculate the appropriate credit and for the entry of an appropriate amended judgment (see Grasso v Grasso, 47 AD3d 762 [2008]).
Under the circumstances of this case, both parties should have shared equally in the appreciation of the marital portion of the property held jointly by them with the defendant’s mother.
Finally, the defendant correctly contends that since both parties are wage earners who contribute toward the support of their two children, the defendant may claim one of the children as a dependent on his income tax returns (see Popelaski v Popelaski, 22 AD3d 735, 738 [2005]).
The defendant’s remaining contentions are without merit. Dillon, J.P., Miller, Belen and Chambers, JJ., concur.