Merge pull request #1 from markhamstra/master-csd

Backport SPARK-1124 fix