add GetQuery & GetQueries
fix uncaught error while tpl is nil