Hacks to work with Spark Core.

Hacks to work with Spark Core.