Fix reading png problem