fix testDatabaseQuery