fix read int bug