catch bad characters in image extraction