fixed an error at  when the variable  has a string value, not a list.