Media: some improvements in the scanner