Fix bug in database list extraction.