fix pdb downloader
Fix bug #1897
code refactor