Fixing the query for fetching column information