[bug] Fix spark exception.

@devoncarew PTAL thanks