Fixed qry_ver to query correctly