More Spark fixes