Fixed bug related to incorrect reading of ppm files.