Writing the wrong size. Changed int -> short