fixed for new database format
new database format