Fixed I/O handling.