Fix the result_as_array to return the correct value types