The charges were partly offset by a $ 2 million gain on the sale of investments of two joint ventures , he said .