Updated to work with the newest io.c code.