Fixes for Spark.