Bugs fixed in read_PNG func.