Office supplies retailer OfficeMax said Thursday it swung to a profit in the fourth-quarter from a year-ago period hurt by hefty costs and asset writedowns, and the company said improved vendor income and lower delivery costs helped boost margins in its contract segment.

Quarterly net income after paying preferred dividends totaled $57 million, or 76 cents per share, compared with a loss of $44.1 million, or 62 cents per share, during the year-ago period, which included a loss from discontinued operations of $20.5 million as well as higher rent and other costs.