fixed a bug in spark loval variables