Fix column name result in query

Fixes a bug in Model.query where column names were not being correctly returned.