Fix BoostIO branch - part one

+1
first part of fixes for the issues in the BoostIO branch. Would be nice if this could be merged asap into the next IB. More to come (and I'd like to see if that round works OK). Thanks.