Fixes for pnm files.