fixed IO return as int