Changed code. Realized that uint can fit into an int64 without
validating the size of the variable.