To array with column bug fix

When using withColumn in a query, calling afterwards toArray will not have that column.