Fix bug with unsigned values appearing as negative signed values