Fixed bug: term list sent as single value rather than list.

In some (possibly all) cases, when querying the available terms, the
result is sent as a single value rather than a list of values. This
causes a crash of the program.