fix integer read/write type