fix for single result

When there's only 1 result, the script didn't receive a list but was
expecting it. That has now been worked around.