fixed an issue with SparkContext serialization