fixed erros in tests - changed db_query_range function to db_query