Bug fix for database structure.