Fixed read and write int 32 trimming into 16 bits