fixed ioComplete method