Fix read/print functions