Db provider bug fixes. Updated queries to return results.