Fix to new IODevice api