some IO bugfix