Reverted changes from commit:825fe85e and commit:2150d44 that were breaking Spark workflow