fixing stdio errors.