write: fix int64 write as int32