Added temporary fix to problem on spark.