fix for SPARK-1027