fixed databaseEvents