SPARK-1878: Fix the incorrect initialization order