Fixed bug with headbytes being cast to byte not an int.
Repo broken?