Merging in fix from spark bug fix.