Fix bug in scan_imdb, fix #2722