Cast scalar return values to array. Fixes #4