Fix transfer encoding bug
Fix issue with the default IO callback