fixed a bug in databaseAccessor