Fixed some byte sizes misunderstandins in the code