America in 2017 that did not recur, revenue recognized on higher margin projects, a mix shift to higher margin aftermarket sales, favorable impact of increased sales on our absorption of fixed manufacturing costs and increased savings related to our Realignment Programs, partially offset by a $7.7 million charge for cost incurred related to the write-down of inventory associated with the divestiture of two IPD locations and related product lines in the second quarter of 2018. Aftermarket sales increased to approximately 50% of total sales, as compared with approximately 48% of total sales in 2017. Gross profit in 2017 decreased by $147.8 million, or 12.0%, as compared with 2016. Gross profit margin in 2017 of 29.7% decreased from 31.0% in 2016. The decrease in gross profit and gross profit margin was primarily attributable to the negative impact of decreased sales on our absorption of fixed manufacturing costs, lower margin projects that shipped from backlog and a $16.9 million charge for costs incurred related to a contract to supply oil and gas platform equipment to an end user in Latin America, partially offset by $10.9 million of charges to write down inventory in Brazil in 2016 that did not recur, a mix shift to higher margin aftermarket sales and lower charges and increased savings related to our Realignment Programs. Aftermarket sales increased to approximately 48% of total sales, as compared with approximately 45% of total sales in 2016. SG&A in 2018 increased by $42.0 million, or 4.7%, as compared with 2017. Currency effects yielded an increase of approximately $7 million. In 2018, SG&A as a percentage of sales remained relatively unchanged as compared with 2017. SG&A was favorably impacted by increased sales leverage, a $26.0 million impairment charge related to our manufacturing facility in Brazil in 2017 that did not recur, lower stock-based compensation expense, lower bad debt expense and lower charges and increased savings related to our Realignment Programs. These favorable cost impacts were substantially offset by charges related to the Flowserve 2.0 Transformation program, implementation costs associated with our adoption of the New Revenue Standard, increased accrued broad-based annual incentive compensation expense and an impairment charge of $9.7 million related to the long-lived assets associated with the divestiture of two IPD locations and related product lines in the second quarter of 2018. SG&A in 2017 decreased by $63.7 million, or 6.6%, as compared with 2016. Currency effects yielded an increase of approximately $6 million. SG&A as a percentage of sales in 2017 increased 40 basis points as compared with 2016 due to a $26.0 million impairment charge related to our manufacturing facility in Brazil, increased accrued broad-based annual incentive compensation and lower sales leverage, partially offset by the $73.5 million reserve established for our primary Venezuelan customer in 2016 that did not recur and savings related to our Realignment Programs. The loss on sale of businesses in 2018 of $7.7 million resulted from the divestiture of two IPD locations and related product lines. The gain on sale of businesses in 2017 was the result of the $141.3 million gain from the sales of the Gestra and Vogt businesses. See Note 3 to our consolidated financial statements included in Item 8 of this Annual Report for additional information on these sales. The $7.7 million loss in 2016 resulted from the sale of a non-strategic foundry business. SG&A 2018 2017 2016 (Amounts in millions, except percentages) SG&A $ 943.7 $ 901.7 $ 965.4 SG&A as a percentage of sales 24.6% 24.6% 24.2% (Loss) Gain on Sale of Businesses 2018 2017 2016 (Amounts in millions) (Loss) gain on sale of businesses $ (7.7) $ 141.3 $ (7.7) Net Earnings from Affiliates 2018 2017 2016 (Amounts in millions) Net earnings from affiliates $ 11.1 $ 12.6 $ 12.9 34