Fixing I/O bugs.