fixed defect with pgm images