bug-fix: possible empty language list

- deal with cases where returned language list is empty