fixing for spark 0.9.0