Fixed  unbound variable problem (i hope)