fixed backwards compatibility code regarding PCX/PNG file change