databaseconnector query fix